package com.zengfa.task.api.model;

import java.time.LocalDateTime;
import java.util.function.Consumer;

import com.zengfa.task.api.enums.JobStatus;
import com.zengfa.task.api.enums.RunType;

import lombok.Data;

@Data
public class JobNodeDTO {

	private String id;
    
    private String jobId;
    
    private Integer nodeOrder;
    
    private String nodeCode;
    
    private String nodeName;
    
    /**
	 * 执行方式，1异步执行,2同步执行
	 */
    private RunType runType;
    
    /**
	 * 执行ip
	 */
    private String execIp;
    
    private JobStatus status;
    
    private String message;
    
    private LocalDateTime startTime;
    
    private LocalDateTime endTime;
    
    private LocalDateTime createdDate;
	
	private String createdBy;
	
	private LocalDateTime updatedDate;
	
	private String updatedBy;
	
	private JobDTO jobDTO;
    
//	private Consumer<JobContextDTO> nodeActuator;
	
	public JobNodeDTO() {
	}
	
	public JobNodeDTO(String nodeCode,String nodeName) {
		this.nodeCode = nodeCode;
		this.nodeName = nodeName;
	}
	
//	public JobNodeDTO(String nodeCode,String nodeName,Consumer<JobContextDTO> nodeActuator) {
//		this.nodeCode = nodeCode;
//		this.nodeName = nodeName;
//		this.nodeActuator = nodeActuator;
//	}
	
}
